
load 'matrice.rb'
load 'gauss.rb'

if ARGV[0] && File.readable?(ARGV[0])
  fd = File.open(ARGV[0], 'r')
else
  puts "Missing input file"
  exit()
end

matrice = Matrice.new()
matr = Matrice.new()
matrice.generate(fd)
fd.close

fd = File.open(ARGV[0], 'r')
matr.generate(fd)

g = Gauss.new(matrice.tab, matrice.dim)
g.pivot
g.displayVector
g.error(matr.tab)